<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head>
<title>首页</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	<div class="container" id="content">
		<section class="content-header">
			<h1>
				<i class="fa fa-send"></i> <strong>信息详情</strong>
			</h1>
			<ol class="breadcrumb">
				<li><a href="#"><i class="fa fa-home "></i>Home</a></li>
				<li>信息管理</li>
				<li class="active">信息详情</li>
			</ol>
		</section>
		<!-- Main content -->
		<section class="content">
			<div class="row">
				<div class="col-md-12">
					<div class="box box-info">
						<div class="box-header with-border">
							<i class="fa fa-th-list"></i>
							<h4 class="box-title">销售信息详情表</h4>
						</div>
						<form id="Form" class="widget-box">
							<input type="hidden" name="id" id="id" th:value="${chanceId}" />
							<div class="widget-content nopadding">
								<table class="table table-bordered">
									<tbody>
										<tr class="odd gradeX">
											<td width="8%" class="center">信息名称</td>
											<td colspan="3">
												<div class="col-md-11">
													<input class="form-control" type="text" id="name"
														name="name" datatype="*,*1-100,t"
														th:value="${saleChance.name}" disabled="disabled" />
												</div>
												<div class="col-md-1">
													<span style="color: #F00">*</span>
												</div>
											</td>
											<td width="8%" class="center">重要程度</td>
						              			<td width="16%">
						              			<div class="col-md-11">
						              			<input class="form-control" type="text" id="chancePriority" name="chancePriority" 
						              			th:value="${saleChance.chancePriority}" disabled="disabled"/>
									             
			                                    </div>
			                            </td>
										</tr>
										<tr class="odd gradeX">
											<td width="8%" class="center">信息来源</td>
											<td width="16%">
												<div class="col-md-11">
													<input type="hidden" name="source1" id="source1"
														th:value="${saleChance.source}" /> <select
														class="form-control" type="text" id="source" name="source"
														datatype="*,*1-100,t" disabled="disabled">
														<option></option>
														<option value="设计院">设计院</option>
														<option value="走访">走访</option>
														<option value="电话传真">电话传真</option>
													</select>
												</div>
												<div class="col-md-1">
													<span style="color: #F00">*</span>
												</div>
											</td>
											<td width="8%" class="center">信息提供人片区</td>
											<td width="16%">
												<div class="col-md-11">
													<input class="form-control" type="text" id="sourceArea"
														name="sourceArea" datatype="*,*1-100,t"
														th:value="${saleChance.sourceArea}" disabled="disabled" />
												</div>
												<div class="col-md-1">
													<span style="color: #F00">*</span>
												</div>
											</td>
											<td width="8%" class="center">设备主要类型</td>
											<td width="16%">
												<div class="col-md-11">
													<input type="hidden" name="sourceType1" id="sourceType1"
														th:value="${saleChance.sourceType}" /> <select
														class="form-control" type="text" id="sourceType"
														name="sourceType" datatype="*,*1-100,t"
														disabled="disabled">
														<option value="无">无</option>
														<option value="离心式">离心式</option>
														<option value="往复式">往复式</option>
														<option value="备件">备件</option>
														<option value="单泵">单泵</option>
														<option value="计量泵">计量泵</option>
										                <option value="往复泵">往复泵</option>
										                <option value="液压隔膜泵">液压隔膜泵</option>
										                <option value="ZD泵">ZD泵</option>
										                <option value="加药装置">加药装置</option>
										                <option value="其他泵">其他泵</option>
													</select>
												</div>
												<div class="col-md-1">
													<span style="color: #F00">*</span>
												</div>
											</td>
										</tr>
										<tr class="even gradeC">
											<td width="8%" class="center">项目动态</td>
											<td width="16%">
												<div class="col-md-11">
													<input class="form-control" type="text" id="projectState"
														name="projectState" th:value="${saleChance.projectState}"
														disabled="disabled" />
												</div>
											</td>
											<td width="8%" class="center">信息来源单位</td>
											<td width="16%">
												<div class="col-md-11">
													<input class="form-control" type="text" id="sourceUnit"
														name="sourceUnit" datatype="*,*1-100,t"
														th:value="${saleChance.sourceUnit}" disabled="disabled" />
												</div>
												<div class="col-md-1">
													<span style="color: #F00">*</span>
												</div>
											</td>
											<td width="8%" class="center">预计订货量</td>
											<td width="16%">
												<div class="col-md-11">
													<input class="form-control" type="text" id="orderAmount"
														name="orderAmount" datatype="*,*1-100,t"
														th:value="${saleChance.orderAmount}" disabled="disabled" />
												</div>
												<div class="col-md-1">
													<span style="color: #F00">*</span>
												</div>
											</td>
										</tr>
										<tr>
											<td width="8%" class="center">订货单位</td>
											<td width="16%">
												<div class="col-md-11">
													<input class="form-control" type="text" id="orderUnit"
														name="orderUnit" th:value="${saleChance.orderUnit}"
														disabled="disabled" />
												</div>
											</td>
											<td width="8%" class="center">设备情况</td>
											<td width="16%">
												<div class="col-md-11">
													<input class="form-control" type="text" id="deviceState"
														name="deviceState" th:value="${saleChance.deviceState}"
														disabled="disabled" />
												</div>
											</td>
											<td width="8%" class="center">信息提供方影响力</td>
											<td width="16%">
												<div class="col-md-11">
													<input type="hidden" name="sourcePower1" id="sourcePower1"
														th:value="${saleChance.sourcePower}" /> <select
														class="form-control" type="text" id="sourcePower"
														name="sourcePower" disabled="disabled"> 
														<option></option>
														<option>大</option>
														<option>较大</option>
														<option>一般</option>
														<option>较小</option>
													</select>
												</div>
											</td>
										</tr>
										<tr>
											<td width="8%" class="center">订货单位所属片区</td>
											<td width="16%">
												<div class="col-md-11">
													<input type="hidden" name="orderUnitArea1"
														id="orderUnitArea1" th:value="${saleChance.orderUnitArea}" />
													<input  readonly="readonly"   class="form-control" name="orderUnitArea1" id="orderUnitArea1" th:value="${saleChance.orderUnitArea}" />
												</div>
											</td>
											<td width="8%" class="center">订货联系人</td>
											<td width="16%">
												<div class="col-md-11">
													<input class="form-control" type="text" id="orderPerson"
														name="orderPerson" th:value="${saleChance.orderPerson}"
														disabled="disabled" />
												</div>
											</td>
											<td width="8%" class="center">联系方式</td>
											<td width="16%">
												<div class="col-md-11">
													<input class="form-control" type="text"
														id="orderPersonPhone" name="orderPersonPhone"
														datatype="*,*1-100,t" th:value="${saleChance.orderPersonPhone}"
														disabled="disabled" />
												</div>
											</td>
										</tr>
										<!-- <tr>
						             	<td width="8%" class="center">收集人</td>
							              <td width="16%">
								              <div class="col-md-11">
								              	<input class="form-control" type="text" id="userName" name="userName" readonly="readonly" th:value="${saleChance.user.empLogin.name}"/>
					                          </div>
				                          </td>
				                          <td>
				                          	<label class="col-sm-1 control-label">所属行业</label>
												<div class="col-sm-3">
												  <div class="col-md-11">
													<select class="form-control" id="business" name="business">
														<option th:each="business:${businesses}"								
													    th:text="${business.title}"
													    th:value="${business.value}"											
													    th:selected="${business.title.contains(customer.business)}">
	                                   					 </option>
													</select>
												  </div>
												</div>
				                          </td>
						             </tr> -->
						             <tr>
						             		<td width="8%" class="center">收集人</td>
							            	<td width="16%">
								              <div class="col-md-11">
								              	<input class="form-control" type="text" id="userName" name="userName" readonly="readonly" th:value="${saleChance.user.empLogin.name}"/>
					                          </div>
				                          	</td>
				                          	<td width="8%" class="center">所属行业</td>
				                          	<td width="16%">
												<div class="col-md-11">
													<select class="form-control" id="busine" name="busine" disabled="disabled">
														<option th:each="business:${businesses}"								
													    th:text="${business.title}"
													    th:selected="${business.title.equals(saleChance.business)}"
													     > 
	                                   					 </option>
													</select>
												  </div>
											</td>
						             </tr>
										<tr>
											<td class="center">订货单位地址</td>
											<td colspan="7"><textarea class="form-control"
													datatype="*,*1-2000" type="text" id="orderUnitAddr" name="orderUnitAddr"
													rows="3" th:text="${saleChance.orderUnitAddr}"
													disabled="disabled"></textarea></td>
										</tr>
										<tr>
											<td class="center">提供信息人资料</td>
											<td colspan="7"><textarea class="form-control"
													datatype="*,*1-2000" type="text" id="sourceOfferInfo" name="sourceOfferInfo"
													rows="3" th:text="${saleChance.sourceOfferInfo}"
													disabled="disabled"></textarea></td>
										</tr>
										<tr>
											<td class="center">备注</td>
											<td colspan="7"><textarea class="form-control"
													datatype="*,*1-2000" style="width: 100%" name="memo" id="memo" rows="3"
													th:text="${saleChance.memo}" disabled="disabled"></textarea>
											</td>
										</tr>
										<tr>
											<td class="center">关闭原因</td>
											<td colspan="7"><textarea class="form-control"
													datatype="*,*1-2000" style="width: 100%" name="closeReason" id="closeReason" rows="3"
													th:text="${saleChance.closeReason}" disabled="disabled"></textarea>
											</td>
										</tr>
									</tbody>
								</table>
							</div>


							<div class="row-fluid">
								<div class="span12">
									<div id="container" class="widget-title">
										<ul class="nav nav-tabs" id="myTabs">
											<li class="active"><a data-toggle="tab" href="#tab1"><span>信息关键人物</span></a></li>
											<li><a data-toggle="tab" href="#tab2"><span>跟踪状态</span></a></li>
											<li><a data-toggle="tab" href="#tab3"><span>流转状态</span></a></li>
										</ul>
									</div>
									<div class="tab-content">
										<div id="tab1" class="active tab-pane">
											<table id="keyManTable"
												class="mytable dataTable table-bordered text-center table-striped table-hover"
												cellspacing="0" width="100%">
												<thead>
													<tr>
														<th>序号</th>
														<th>姓名</th>
														<th>职务</th>
														<th>联系方式</th>
														<th>称呼</th>
														<th>备注</th>

													</tr>
												</thead>
												<tbody>

												</tbody>
											</table>
										</div>
										<div id="tab2" class="tab-pane">
											<table id="allTranceTable"
												class="mytable dataTable table-bordered text-center table-striped table-hover"
												cellspacing="0" width="100%">
												<thead>
													<tr>
														<th width="10%">时间</th>
														<th width="10%">跟踪人员</th>
														<th width="20%">所属部门</th>
														<th width="30%">跟踪情况</th>
														<th width="30%">跟踪结果</th>
														<th width="30%">预计订货量</th>
													</tr>
												</thead>
												<tbody>

												</tbody>
											</table>
										</div>
										<div id="tab3" class="tab-pane">
											<table id="flowNodeTable"
												class="table table-bordered table-striped table-condensed nopadding"
												width="100%">
												<thead>
													<tr>
														<th width="10%">序号</th>
														<th width="15%">流转操作</th>
														<th width="10%">操作人</th>
														<th width="15%">操作部门</th>
														<th width="15%">流转去向</th>
														<th width="15%">操作时间</th>
														<th width="20%">备注</th>
													</tr>
												</thead>
												<tbody>
													<tr th:each="node,index:${nodes}">
														<td th:text="${index.count}"></td>
														<td th:text="${node.flowOperate}"></td>
														<td th:text="${node.startNode}"></td>
														<td th:text="${node.user.saleArea.superiorArea}"></td>
														<td th:text="${node.endNode}"></td>
														<td th:text="${#dates.format(node.createTime,'yyyy/MM/dd HH:mm')}"></td>
														<td th:text="${node.reason}"></td>
													</tr>
												</tbody>
											</table>
										</div>
									</div>
								</div>
							</div>
							<div class="modal-footer">
								<a type="button" class="btn btn-primary pull-right"
									href="javascript:history.go(-1)">返回</a>
							</div>
						</form>
					</div>
				</div>
			</div>
		</section>
		<script type="text/javascript">
			jQuery(function() {
				$('#myTabs a:first').tab('show');
			})
		</script>
		<script th:src="@{/chance/chanceDetail.js}"></script>
	</div>

</body>
</html>